﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ZiChen.SoXunLeiPan.Resources.Converters.ErrorConvert
{
    public class ErrorTypeToButtonColorConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return (int)value switch
            {
                1 => Colors.Blue,     // 网络错误
                2 => Colors.Gray,     // 返回
                3 => Colors.Orange,   // 客服
                4 => Colors.Red,      // 内部错误
                _ => Colors.Gray
            };
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
